import { Service, Inject } from 'typedi';
import { res } from '@/utils/jsonResult';
import { MenuService } from '../MenuService';
import { Menu } from '@/entity/Menu';
import { MenuDao } from '@/dao/MenuDao';
import {addMenuParams } from "@/model/request/Menu";

@Service()
export class MenuServiceImpl implements MenuService {

    @Inject()
    menuDao!: MenuDao

    async GetAllMenu(): Promise<res<Menu[]>> {
        return this.menuDao.GetAllMenuDao();
    }

    async addMenu(params: addMenuParams): Promise<res<null>> {
        return this.menuDao.addMenuDao(params);
    }

}